package org.dtrd.modules.food.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.dtrd.modules.food.entity.bean.EmsGlycemicIndexBean;
import org.dtrd.modules.food.entity.bean.FoodDetail;
import org.dtrd.modules.food.entity.bean.FoodListInfo;
import org.dtrd.modules.food.entity.po.DtrdExtEmsYwFoods;
import org.dtrd.modules.food.entity.request.FoodPageRequest;

import java.util.List;

/**
 * <p>
 * 食材库服务类
 * </p>
 *
 * @author QR
 * @since 2021-12-08
 */
public interface IDtrdExtEmsYwFoodsService extends IService<DtrdExtEmsYwFoods> {

    /**
     * 查询升糖食物列表
     *
     * @param giIndex
     * @param foodName
     * @param pageNum
     * @param pageSize
     * @return
     */
    IPage<EmsGlycemicIndexBean> selectGiFoodList(Integer giIndex, String foodName, Integer pageNum, Integer pageSize);

    List<FoodDetail> getFoodsList(FoodPageRequest request);

    FoodDetail getFoods(Integer dataId);

    boolean saveOrUpdateFoods(FoodDetail dto);

    boolean removeFoods(Integer dataId);

    /**
     * 分页获取食材列表
     */
    IPage<FoodListInfo> pageFood(FoodPageRequest request);
}
